﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BrokerBase.Lib.Product;

namespace BrokerBase.Lib.Policy
{
    public class DutyActing:IDutyActing
    {
        private IPolicyPeriodActing ppa;
        private IDuty duty;

        public DutyActing(IPolicyPeriodActing ppa,IDuty duty)
        {
            this.ppa = ppa;
            this.duty = duty;
        }

        public IPolicyPeriodActing PolicyPeriodActing
        {
            get { return ppa; }
        }

        public IDuty Duty 
        {
            get { return duty; } 
        }

        public double Value { get; set; }

        public double TotalValue 
        {
            get
            {
                return ppa.GetDutyTotalValue(Duty.Name);
            }
        }

        public string Description { get; set; }

        public object Tag { get; set; }

        public bool IsDeduction { get; set; }

    }
}
